Skip to content

Don't ICE if crate has no valid crate types left #51035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 26, 2018

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented May 24, 2018

fixes #50993

@rust-highfive
Copy link
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 24, 2018
@@ -642,7 +642,7 @@ fn write_metadata<'a, 'gcx>(tcx: TyCtxt<'a, 'gcx, 'gcx>,
config::CrateTypeDylib |
config::CrateTypeProcMacro => MetadataKind::Compressed,
}
}).max().unwrap();
}).max().unwrap_or(MetadataKind::None);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the source of the regression. Reaching this code is the source of the regression. But it seems a sensible change anyway imo.

If preferred I'll do a bisect and figure out where the real regression happened

@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.

[00:05:17] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:05:17] tidy error: /checkout/src/test/ui/issue-50993.rs: missing trailing newline
[00:05:19] some tidy checks failed
[00:05:19] 
[00:05:19] 
[00:05:19] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:05:19] 
[00:05:19] 
[00:05:19] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:05:19] Build completed unsuccessfully in 0:02:10
[00:05:19] Build completed unsuccessfully in 0:02:10
[00:05:19] make: *** [tidy] Error 1
[00:05:19] Makefile:79: recipe for target 'tidy' failed

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:33993d5c
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@eddyb
Copy link
Member

eddyb commented May 25, 2018

@bors r+

@bors
Copy link
Collaborator

bors commented May 25, 2018

📌 Commit 0b1b26f has been approved by eddyb

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 25, 2018
bors added a commit that referenced this pull request May 26, 2018
Don't ICE if crate has no valid crate types left

fixes #50993
@bors
Copy link
Collaborator

bors commented May 26, 2018

⌛ Testing commit 0b1b26f with merge 67d99d9...

@bors
Copy link
Collaborator

bors commented May 26, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: eddyb
Pushing 67d99d9 to master...

@bors bors merged commit 0b1b26f into rust-lang:master May 26, 2018
@oli-obk oli-obk deleted the unsupported_crate_type branch June 15, 2020 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unsupported crate type results in ICE
4 participants